//
//  BLOrder_Cell_Shell.m
//  Byelone
//
//  Created by 乔小乔 on 2021/2/10.
//

#import "BLOrder_Cell_Shell.h"

@implementation BLOrder_Cell_Shell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.viewBj.layer.shadowColor = [UIColor colorWithRed:8/255.0 green:6/255.0 blue:4/255.0 alpha:0.07].CGColor;
    self.viewBj.layer.shadowOffset = CGSizeMake(0,0);
    self.viewBj.layer.shadowOpacity = 1;
    self.viewBj.layer.shadowRadius = 5;
    self.viewBj.layer.cornerRadius = 5;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)reloadWith:(BLOtherItem *)model{
    self.labelTitle.text = [self getWaysBy:model.giftChannel?:@""];
    NSString *strUnit = @"+";
    if ([model.giftPayType isEqualToString:@"1"]) {
        self.labelAmount.textColor = [UIColor chColorWithHexString:@"#47C929"];
    }else{
        strUnit = @"-";
        self.labelAmount.textColor = [UIColor chColorWithHexString:@"#FB5E5E"];
    }
    NSString *strAmount = [NSString stringWithFormat:@"%@%@",strUnit,model.giftAmount];
    self.labelAmount.text = strAmount;
    self.labelDate.text = [NSDate stringFullDateTimeStamp:model.createTime];
}

- (NSString *)getWaysBy:(NSString *)chanel{
    NSDictionary *dict = @{@"1":@"用户注册", @"2":@"头像审核",@"3":@"完善全部信息", @"4":@"完成性格测试", @"5":@"完成期望测试", @"6":@"签到", @"7":@"vip", @"8":@"购买", @"9":@"赠送"};
    return dict[chanel];
}
@end
